package com.ruoyi.trade.service.impl;

import com.ruoyi.trade.domain.RollingShortDateConfig;
import com.ruoyi.trade.mapper.RollingShortDateConfigMapper;
import com.ruoyi.trade.service.IRollingShortDateConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 移仓做空日期配置Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-10
 */
@Service
public class RollingShortDateConfigServiceImpl implements IRollingShortDateConfigService 
{
    @Autowired
    private RollingShortDateConfigMapper rollingShortDateConfigMapper;

    /**
     * 查询移仓做空日期配置
     * 
     * @param id 移仓做空日期配置主键
     * @return 移仓做空日期配置
     */
    @Override
    public RollingShortDateConfig selectRollingShortDateConfigById(Long id)
    {
        return rollingShortDateConfigMapper.selectRollingShortDateConfigById(id);
    }

    /**
     * 查询移仓做空日期配置列表
     * 
     * @param rollingShortDateConfig 移仓做空日期配置
     * @return 移仓做空日期配置
     */
    @Override
    public List<RollingShortDateConfig> selectRollingShortDateConfigList(RollingShortDateConfig rollingShortDateConfig)
    {
        return rollingShortDateConfigMapper.selectRollingShortDateConfigList(rollingShortDateConfig);
    }

    /**
     * 新增移仓做空日期配置
     * 
     * @param rollingShortDateConfig 移仓做空日期配置
     * @return 结果
     */
    @Override
    public int insertRollingShortDateConfig(RollingShortDateConfig rollingShortDateConfig)
    {
        return rollingShortDateConfigMapper.insertRollingShortDateConfig(rollingShortDateConfig);
    }

    /**
     * 修改移仓做空日期配置
     * 
     * @param rollingShortDateConfig 移仓做空日期配置
     * @return 结果
     */
    @Override
    public int updateRollingShortDateConfig(RollingShortDateConfig rollingShortDateConfig)
    {
        return rollingShortDateConfigMapper.updateRollingShortDateConfig(rollingShortDateConfig);
    }

    /**
     * 批量删除移仓做空日期配置
     * 
     * @param ids 需要删除的移仓做空日期配置主键
     * @return 结果
     */
    @Override
    public int deleteRollingShortDateConfigByIds(Long[] ids)
    {
        return rollingShortDateConfigMapper.deleteRollingShortDateConfigByIds(ids);
    }

    /**
     * 删除移仓做空日期配置信息
     * 
     * @param id 移仓做空日期配置主键
     * @return 结果
     */
    @Override
    public int deleteRollingShortDateConfigById(Long id)
    {
        return rollingShortDateConfigMapper.deleteRollingShortDateConfigById(id);
    }
}
